<div id="header">
    <div id="top">
        <h1><a href="<?php echo $this->baseUrl ?>">Middleman</a></h1>
        <?php
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            ?>
        <p id="userbox">Hello <strong><a href="/user/profile/<?php echo $auth->getIdentity()->id?>"><?php echo $auth->getIdentity()->username ?></a></strong> &nbsp;| &nbsp;&nbsp;<a href="/user/logout">Logout</a> <br />
                <small>Last Login: <?php echo date('d M Y', $auth->getIdentity()->last_login) ?></small></p>
        <?php } else { ?>

            <p id="userbox">&nbsp;<a href="/user/login">Log in</a> <br />
            <?php } ?>
            <span class="clearFix">&nbsp;</span>
    </div>
    <ul id="menu">
        <li class="selected"><a href="#">Dashboard</a></li>
        <li><a href="/user/list">Users <span>&nbsp;</span></a>
        </li>
        <li><a href="/project/list">Projects <span>&nbsp;</span></a>
        </li>
    </ul>
    <form action="" method="get" name="form1" id="form1">
        <fieldset>
            <legend>Search</legend>
            <label id="searchbox">
                <input type="text" name="s" id="s" />
            </label>
            <input class="hidden" type="submit" name="Submit" value="Search" />
        </fieldset>
    </form>
    <span class="clearFix">&nbsp;</span>
</div><!-- end of #header -->